﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using xfsale.lib;

namespace xfsale.ui
{
    public partial class CtrlCustomer : UserControl
    {
        public CtrlCustomer()
        {
            InitializeComponent();
        }

        private void CtrlCustomer_Load(object sender, EventArgs e)
        {
            if (!this.DesignMode)
            {
                if (App.Customer.CustType == "0")
                {
                    RadIndi.Checked = false;
                    RadInst.Checked = true;
                    SysControl.InitCtrl(CmbCertType, "InstCertType");
                    SysControl.SetCtrlValue(CmbCertType, App.Customer.CertType);
                }
                else
                {
                    RadIndi.Checked = true;
                    RadInst.Checked = false;
                    SysControl.InitCtrl(CmbCertType, "IndiCertType");
                    SysControl.SetCtrlValue(CmbCertType, App.Customer.CertType);
                }

                TxtInvstName.Text = App.Customer.CustName;
                TxtCertNo.Text = App.Customer.CertNo;
            }
        }
    }
}
